<?php
/* @var $this BackAccountsController */
/* @var $model BackAccounts */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'back-accounts-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'back_accounts_no'); ?>
		<?php echo $form->textField($model,'back_accounts_no'); ?>
		<?php echo $form->error($model,'back_accounts_no'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'location'); ?>
		<?php echo $form->textField($model,'location',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'location'); ?>
	</div>

		<div class="row">
		<?php echo CHtml::activeLabelEx

($model,'period_covered_start'); ?>
		<?php echo CHtml::activeTextField

($model,'period_covered_start',array("id"=>"a_date")); ?>
		<?php echo CHtml::image

("images/cal.jpg","calendar",
		array("id"=>"a_button","class"=>"pointer")); ?>
		&nbsp;(Click this)
		<?php $this->widget

('application.extensions.calendar.SCalendar',
        array(
        'inputField'=>'a_date',
        'button'=>'a_button',
        'ifFormat'=>'%Y-%m-%d',
    ));
    ?>
		<?php echo $form->error

($model,'period_covered_start'); ?>
	</div>

	<div class="row">
		<?php echo CHtml::activeLabelEx

($model,'period_covered_end'); ?>
		<?php echo CHtml::activeTextField

($model,'period_covered_end',array("id"=>"b_date")); ?>
		<?php echo CHtml::image

("images/cal.jpg","calendar",
		array("id"=>"b_button","class"=>"pointer")); ?>
		&nbsp;(Click this)
		<?php $this->widget

('application.extensions.calendar.SCalendar',
        array(
        'inputField'=>'b_date',
        'button'=>'b_button',
        'ifFormat'=>'%Y-%m-%d',
    ));
    ?>
		<?php echo $form->error

($model,'period_covered_end'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($model,'total_accts'); ?>
		<?php echo $form->textField($model,'total_accts'); ?>
		<?php echo $form->error($model,'total_accts'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'remarks'); ?>
		<?php echo $form->textArea($model,'remarks',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'remarks'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'unit_assignment'); ?>
		<?php echo $form->textField($model,'unit_assignment',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'unit_assignment'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'duty_status'); ?>
		<?php echo $form->textField($model,'duty_status',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'duty_status'); ?>
	</div>
	<div>
<?php echo $form->labelEx($model,'employee_id'); ?>
<?php echo $form->dropDownList($model, 'employee_id', 

CHtml::listData(
Employee::model()->findAll(), 'id', 'employee_id','employee_name'),
array('prompt' => 'Select an Employee')
); ?>
<?php echo $form->error($model,'employee_id'); ?>
</div>



		<div>
<?php echo $form->labelEx($model,'main_ledger_id'); ?>
<?php echo $form->dropDownList($model, 'main_ledger_id', 

CHtml::listData(
MainLedger::model()->findAll(), 'id', 'id','soldier_id'),
array('prompt' => 'Select a id')
); ?>
<?php echo $form->error($model,'main_ledger_id'); ?>
</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->